package com.lovo.invoicing.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.lovo.invoicing.bean.PageBean;
import com.lovo.invoicing.bean.RoleBean;
import com.lovo.invoicing.bean.RoleLimit;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface RoleMapper extends BaseMapper<RoleBean> {

     IPage<RoleBean> selectRoles(Page page);

     void   insertRoleLimit(List<RoleLimit> list);

     void deleteRoleLimitByRoleId(int roleId);

     List<String> selectLimitsByRoleIds(@Param("roleIds") int[] roleIds);

     List<Integer> selectRoleIdsByUserId(int userId);

     List<String> selectLimitDescByRoleId(int roleId);

     List<Integer> selectLimitIdsByRoleId(int roleId);
}
